@@ -40,10 +40,10 @@ class SetCharsetForMysql < ActiveRecord::Migration |
||
40 | 40 |
|
41 | 41 |
case type |
42 | 42 |
when :string, :text |
43 |
- options.update(charset: 'utf8', collation: 'utf8_general_ci') |
|
43 |
+ options.update(charset: 'utf8', collation: 'utf8_unicode_ci') |
|
44 | 44 |
case name |
45 | 45 |
when 'username' |
46 |
- options.update(limit: 767 / 4, charset: 'utf8mb4', collation: 'utf8mb4_general_ci') |
|
46 |
+ options.update(limit: 767 / 4, charset: 'utf8mb4', collation: 'utf8mb4_unicode_ci') |
|
47 | 47 |
when 'message', 'options', 'name', 'memory', |
48 | 48 |
'handler', 'last_error', 'payload', 'description' |
49 | 49 |
options.update(charset: 'utf8mb4', collation: 'utf8mb4_bin') |
@@ -60,10 +60,10 @@ class SetCharsetForMysql < ActiveRecord::Migration |
||
60 | 60 |
change_column table_name, name, type, options |
61 | 61 |
} |
62 | 62 |
|
63 |
- execute 'ALTER TABLE %s CHARACTER SET utf8 COLLATE utf8_general_ci' % table_name |
|
63 |
+ execute 'ALTER TABLE %s CHARACTER SET utf8 COLLATE utf8_unicode_ci' % table_name |
|
64 | 64 |
} |
65 | 65 |
|
66 |
- execute 'ALTER DATABASE %s CHARACTER SET utf8 COLLATE utf8_general_ci' % conn.current_database |
|
66 |
+ execute 'ALTER DATABASE %s CHARACTER SET utf8 COLLATE utf8_unicode_ci' % conn.current_database |
|
67 | 67 |
end |
68 | 68 |
|
69 | 69 |
dir.down do |
@@ -164,7 +164,7 @@ ActiveRecord::Schema.define(version: 20140813110107) do |
||
164 | 164 |
t.integer "failed_attempts", default: 0 |
165 | 165 |
t.string "unlock_token" |
166 | 166 |
t.datetime "locked_at" |
167 |
- t.string "username", limit: 191, null: false, charset: "utf8mb4", collation: "utf8mb4_general_ci" |
|
167 |
+ t.string "username", limit: 191, null: false, charset: "utf8mb4", collation: "utf8mb4_unicode_ci" |
|
168 | 168 |
t.string "invitation_code", null: false, collation: "utf8_bin" |
169 | 169 |
t.integer "scenario_count", default: 0, null: false |
170 | 170 |
end |